#

| Chapter 28 Comparing Files |

## 28.8 More Friendly diff Output

ediff | If you find the output of the diff (28.1) program to be hard to follow, try using the ediff program to filter diff output into something more readable. For example, the diff program might produce the following output:

>     % diff chapter2 chapter2.new
>     i22,26d21
>     < Use the bc program to convert from decimal to hexadecimal.
>     < To do so, use the obase command to set the base for output:
>     <
>     <       obase=16
>     <
>     39c34,35
>     < See Section 5.6 for more examples of using bc.
>     --
>     > See Section 5.6 for information on how to use the bc command to
>     > convert decimal to hexadecimal.

This is a little hard to follow until you get used to the format. Now try filtering the output through ediff:

>     % diff chapter2 chapter2.new | ediff

>     ---- 5 lines deleted at 22:
>     Use the bc program to convert decimal to hexadecimal.
>     To do so, use the obase command to set the base for output:

>             obase=16

>     ---- 1 line changed to 2 lines at 39 from:
>     See Section 5.6 for more examples of using bc.
>     ---- to:
>     See Section 5.6 for information on how to use the bc command to
>     convert decimal to hexadecimal.

Now you see why ediff describes itself as a "diff to English translator."

- LM

28.7 diff for Very Long Files: bdiff |  | 28.9 ex Scripts Built by diff